﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Template.Master" Inherits="System.Web.Mvc.ViewPage<JLL.China.Model.ProjectDirectory>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <div id="page-heading">
        <h1>
            <a class="icons icon-circle-arrow-right"></a> <b><span class="show-listing"> 
            <%=ViewData["HeadingMsgStep1"].ToString()%>
              </span> </b>
        </h1>
    </div>
    <div class="menu-nav">
        <% Html.RenderPartial("TopMenu");%>
   
    </div>
    <!-- end page-heading -->
    <table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
        <tr>
            <th rowspan="3" class="sized">
                <img src="<%=Url.Content("~/Content/images/shared/side_shadowleft.jpg")%>" width="20"
                    height="300" alt="" />
            </th>
            <th class="topleft">
            </th>
            <td id="tbl-border-top">
                &nbsp;
            </td>
            <th class="topright">
            </th>
            <th rowspan="3" class="sized">
                <img src="<%=Url.Content("~/Content/images/shared/side_shadowright.jpg")%>" width="20"
                    height="300" alt="" />
            </th>
        </tr>
        <tr>
            <td id="tbl-border-left">
            </td>
            <td>
                <!--  start content-table-inner ...................................................................... START -->
                <div id="content-table-inner">
                    <div id="tab-language">
                     

                        <!--  start message-blue -->
                        <% Html.RenderPartial("Measage");%>
                        <!--  end message-blue -->
                    </div>
                    <!--  start step-holder -->
                    <%Html.RenderPartial("../ProjectDirectory/StepHolder", (this.Model != null) ? this.Model.ID.ToString() : null); %>
                    <!-- start id-form -->
                    <form action="<%=Url.Content("~/")%><%=ViewData["now_controller"]%>Step1/" class="validateforms" id="formID" method="post">
                    <input type="hidden" value="<%=ViewData["LanguageID"]%>" name="LanguageFID" />
                    <input type="hidden" value="<%=(this.Model != null) ? this.Model.ID.ToString() : "" %>"
                        name="ListingID" />
                    <input type="hidden" value="<%=ViewData["ListingType"]%>" name="ListingType" />
                    <input type="hidden" value="<%=ViewData["IsLocal"]%>" name="IsLocal" />
                    <input type="hidden" value="<%=ViewData["ListingSource"]%>" name="ListingSource" /> 
                   <input type="hidden" value="<%=(this.Model != null) ? this.Model.ProjectNameFID.ToString() : "" %>" name="ProjectNameFID" />
                   <input type="hidden" value="<%=(this.Model != null) ? this.Model.StreetNameFID.ToString() : "" %>" name="StreetNameFID" />
                    <%Html.RenderPartial("../ProjectDirectory/Form", this.Model); %>
                    </form>
                </div>
                <!--  end table-content  -->
            </td>
            <td id="tbl-border-right">
            </td>
        </tr>
        <tr>
            <th class="sized bottomleft">
            </th>
            <td id="tbl-border-bottom">
                &nbsp;
            </td>
            <th class="sized bottomright">
            </th>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CSS" runat="server">
    <% Html.RenderPartial("Css"); %>
    <style type="text/css">
        .scrollbox
        {
          max-height: 280px !important;
            min-width: 181px !important;
        }
        .chz {
            width: 315px !important;
        }
    </style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="JS" runat="server">
    <% Html.RenderPartial("Js"); %>
    <script src="<%=Url.Content("~/Scripts/Run.js")%>" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            $.ajaxSetup({ cache: false });
            $("#ProjectName").bind("keyup change blur", function() {
                var data = $(this).val();

                if (data.length == 0) {
                    $(".checkitem").text("");
                    $(".checkitem").removeClass("green");
                    $(".checkitem").removeClass("red");
                } else {
                    $.ajax({
                        url: BASE_URL + "Listings/Ajax/CheckProjectName",
                        type: 'POST', // POST or GET
                        data: { projectname: data },
                        success: function(result, status) {
                            if (result == "YES") {
                                $(".checkitem").text("That project name  is already in use.");
                                $(".checkitem").removeClass("green");
                                $(".checkitem").addClass("red");

                            } else {
                                $(".checkitem").text("");
                                $(".checkitem").removeClass("red");
                               // $(".checkitem").addClass("green");
                               
                            }
                        }
                    }
		);

                }
            });


        });
    </script>
</asp:Content>
